package com.gnerv.sylvanas.authentication.security.autoconfigure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author Gnerv LiGen
 */
@Data
@ComponentScan(value = "com.gnerv.sylvanas.authentication.security")
@ConfigurationProperties(prefix = "sylvanas.security")
public class SylvanasSecurityConfigProperties {

    private static final String SUPER_ADMIN = "superadmin";
    private static final String[] DEFAULT_PUBLIC_URLS = {"/static/**",
            "/api/public/**",
            "/api/phone/login",
            "/webjars/**",
            "/v3/api-docs/**",
            "/swagger-ui.html",
            "/doc.html"};
    private static final String DEFAULT_LOGIN_URL = "/api/login";
    private static final String DEFAULT_LOGOUT_URL = "/api/logout";
    private static final Integer DEFAULT_MAXIMUM_SESSIONS = 1;

    private boolean enable = true;
    private String superAdmin = DEFAULT_LOGIN_URL;
    private String loginUrl = DEFAULT_LOGIN_URL;
    private String loginPageUrl = DEFAULT_LOGIN_URL;
    private String logoutUrl = DEFAULT_LOGOUT_URL;
    private String[] publicUrl = DEFAULT_PUBLIC_URLS;
    private Integer maximumSessions = DEFAULT_MAXIMUM_SESSIONS;


}
